home *** CD-ROM | disk | FTP | other *** search
- Path: brookes.ac.uk!news
- From: Krunchie <95155580@brookes.ac.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Trapping Ctrl-Alt-Del
- Date: 19 Apr 1996 09:42:21 GMT
- Organization: Digital Dynamics Unlimited
- Message-ID: <4l7n5t$bse@cs3.brookes.ac.uk>
- References: <4kqh5e$fap@ms.slip.net>
- NNTP-Posting-Host: rm003b4a.brookes.ac.uk
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
-
- mavrick@slip.net (Mavrick) wrote:
- >I am running a network of 50 pcs in a class room where students always
- >manage to bypass the provided computer curriculum program by rebooting
- >(Ctrl-Alt-Del) their way out, and fool around the hard disks. Some
- >also found out that Ctrl-C or Ctrl-break would do the same trick. I
- >need to fine tune the menu program I wrote 2 years ago and implement
- >a keyboard trapping algorithm to weed out the Ctrl-Alt-Del and Ctrl-C
- >/Ctrl-break. Any other keys I can easily trap by scanning for their
- >scan codes; however, those 3 combos work differrently.
- >
- >Could someone write me a short program in C / C++ that would do the
- >trick. Something as simple as printing 'Hello' every time any of
- >those combos are pressed. Perhaps I could return the favor by
- >inviting you for lunch should you ever come across the Bay Area
- >(Northern California). Thank You. Marvick W C
- >
- >mavrick@slip.net
- >
-
- If you are using the Turbo C compiler then you can implement this bit of
- code to stop control break from terminating the program (this is not
- checked!!):
-
-
-
- int ctrl_break(void);
-
- int main()
- {
- ctrlbrk(ctrl_break);
- .
- . /* Rest of your program */
- .
- }
-
- int ctrl_break(void)
- {
- main();
- return 0;
- }
-
- I don't know how you can disable Ctrl-Alt-Del, I'd like to know myself,
- however couldn't you set up the machines so that your program executes on
- boot up, disabling various bios options so that your students can't
- bypass this?
-
- Krunchie
-
-